
from app import httpService

@httpService.ContrMapping("/test")
class TestController:

    @httpService.routerMap("/data", "POST")
    def data(format_data:list) -> bytes:
        #context= httpService.context
        headers = [
            "Allow: GET, POST", 
            "Connection: close"
        ]
        content = "data"
        return httpService.responseBuild("200", "OK", headers, content)
    
    @httpService.routerMap("/index", "GET")
    def index(format_data:list) -> bytes:
        a = httpService.context
        headers = [
            "Allow: GET, POST", 
            "Connection: close"
        ]
        content = "index"
        return httpService.responseBuild("200", "OK", headers, content)
